package xyz.eden.boot.uc.infrastructure.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;

import javax.annotation.Resource;

/**
 * EnvironmentConfig
 *
 * @author gavin
 * @version 1.0
 * @descriptor
 * @date 2023/7/30 14:47
 */
@Slf4j
@Configuration
public class EnvironmentConfig {


    @Resource
    private Environment environment;

    public String getEnvConfigByKey(String key, String defaultVal) {
        return environment.getProperty(key, defaultVal);
    }

    public Environment getEnvironment() {
        return environment;
    }

}
